-- GENERATED SPELL FOR [Gelkis Earthcaller] --


function spell0_4651(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20815,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4651', 3000, 1)
end

function spell1_4651(pUnit, Event) --@Summon Gelkis Rumbler,Self--
pUnit:FullCastSpellOnTarget(9653,pUnit)
pUnit:RegisterEvent('Sorts_4651', 659, 1)
end

function Sorts_4651(pUnit, Event)
local choix_sorts_4651 = math.random(0, 1)
if choix_sorts_4651 == 0 then
pUnit:RegisterEvent('spell0_4651', 1, 1)
end
if choix_sorts_4651 == 1 then
pUnit:RegisterEvent('spell1_4651', 1, 1)
end
end

function mob4651_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4651', math.random(1500, 3000), 1)
end

function mob4651_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4651_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4651_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4651, 1, 'mob4651_Action')
RegisterUnitEvent(4651, 2, 'mob4651_Leave')
RegisterUnitEvent(4651, 3, 'mob4651_Kill')
RegisterUnitEvent(4651, 4, 'mob4651_Die')
